<h2>Lista studentów:</h2>

<table>
<tr>
	<th>Indeks</th>
	<th>Nazwisko</th>
	<th>Imie</th>
	<th title="Należy podać tylko kiedy się zmienia">Hasło</th>
	<th>Rok</th>
	<th title="Czy dokonał wyboru">Reg.</th>
	<th title="Czy zablokował zapisy">Lock</th>
	<th>admin</th>
</tr>
<form action="" method="post">
<input type="hidden" name="editData" value="1" />
{foreach from=$students item=std}
<tr>
<td>
<input type="hidden" name="type[{$std.indexID}]" value="edit" />
<input type="text" name="indexID[{$std.indexID}]" value="{$std.indexID}" readonly="readonly" class="indexID"/></td>
<td><input type="text" name="surname[{$std.indexID}]" value="{$std.surname}" class="text" /></td>
<td><input type="text" name="name[{$std.indexID}]" value="{$std.name}"  class="text" /></td>
<td><input type="password" name="password[{$std.indexID}]" value="" class="text" /></td>
<td><input type="text" name="year[{$std.indexID}]" value="{$std.year}" class="year" /></td>
<td style="background: {if $std.register}#0f0{else}#f00{/if}; "></td>
<td><input type="checkbox" name="locked[{$std.indexID}]" {if $std.locked}checked="checked"{/if} /></td>
<td><input type="checkbox" name="admin[{$std.indexID}]" {if $std.admin}checked="checked"{/if} /></td>

<td><a href="?admin,students,del,{$std.indexID}"><img src="_gfx/admin_drop.png" alt="usuń" title="usuń"/></a></td>
<td><a href="?show,{$std.indexID}" target="_blank">wybór</a></td>

</tr>
{/foreach}

<tr><td colspan="7"><input type="submit" value="Aktualizuj"/></td></tr>
</form>
<tr><td colspan="7">Dodaj:</td></tr>
<tr>
<form action="" method="post">
<td><input type="hidden" name="type" value="add" />
<input type="text" name="indexID" class="indexID" /></td>
<td><input type="text" name="surname" class="text" /></td>
<td><input type="text" name="name" class="text" /></td>
<td><input type="password" name="password" value="" class="text" /></td>
<td><input type="text" name="year" class="year" /></td>
<td></td><td></td>

<td><input type="checkbox" name="admin"  /></td>
<td><input type="submit" value="Dodaj" /></td>
</form>
</tr>
</table>